<?php
namespace app\zhihui\controller;

use app\common\model\ZhSupportReplyEducation as ZhSupportReplyEducationModel;
use app\home\controller\Base;

/**
 * 回答受教控制器
 * Class Zhsupportreplyeducation
 * @package app\index\controller
 */
class Zhsupportreplyeducation extends Base
{
    /**
     * [add  添加]
     * @return json
     * @author [C。]
     */
    public function add()
    {
        $param = input('param.');
        $model = new ZhSupportReplyEducationModel;
        $user = $this->user;
        try{
            $param['mid'] = $user['id'];
            $model->addData($param);
        }catch(\Exception $e){
            systembug($e->getMessage(),2,$this->url);
            return admin_json(-1, $e->getMessage());
        }
        return admin_json(1, '添加成功');
    }
}